KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Preventing a Locked Data File From Being Opened
PRODUCT: 4D | VERSION: 2003 | PLATFORM: Mac & Win
Published On: July 24, 2003

Starting with version 2003, you can now use a single command to check if the data file or any of its segments is locked. A file is considered 'locked', if it is write protected.

For example, you could place the following code in the On Startup database method:

If (Is data file locked)
   ALERT("The data file is locked. Impossible to open database.")
   QUIT 4D
End if